// =================================================================
// File: Directory.h
// Desc: Contains Directory class which inherits from File class
// =================================================================

#ifndef DIRECTORY_H
#define DIRECTORY_H

// =================================================================
// INCLUDES
// =================================================================

#include <map>
#include <string>
#include "File.h"

using namespace std;

// =================================================================
// CLASSES
// =================================================================

// =================================================================
// Name: Directory
// Desc: Extension of File class which also contains a map storing
//       filename and inode combinations
// =================================================================
class Directory : public File
{

    public:
        Directory(int current_inode, int parent_inode);
        Directory(int current_inode);
        ~Directory();

        int GetEntry(string filename);
        void InsertEntry(string filename, int inode);
        void RemoveEntry(string filename);

        map<string, int> GetEntries();

    private:
        map<string, int> entries;	// Stores filenames and inodes

};

#endif // DIRECTORY_H
